package com.frkj.yuan.fragment.my;
import android.view.View;

import androidx.recyclerview.widget.RecyclerView;

import com.frkj.yuan.R;
import com.frkj.yuan.activity.XiaofeiMingXiDetialsActivity;
import com.frkj.yuan.adapter.BaseRecyclerHolder;
import com.frkj.yuan.adapter.BaseRecyclerRefreshAdapter;
import com.frkj.yuan.base.BaseFragment;
import com.frkj.yuan.data.YuyueKeshiDataUtils;
import com.frkj.yuan.view.RecyclerViewLayoutManager;

import java.io.IOException;
import java.util.List;

import butterknife.BindView;
/**
 * 界面: StoredMoneyXiaoFeiFragment界面
 * company: 兰州丰荣信息科技有限公司
 * 创建时间: on 2022/2/25 10 ：51
 * 项目名称：yuanban
 */
public class StoredMoneyXiaoFeiFragment extends BaseFragment implements BaseRecyclerRefreshAdapter.OnItemClickListener {
    @BindView(R.id.base_recycler)
    RecyclerView mRecyclerViews;

    @Override
    public int getLayoutResource() {
        return R.layout.base_recycler_view;
    }

    @Override
    public void initLayoutView() {
        RecyclerViewLayoutManager.setLinearVerticalItemDecorationManager(getActivity(), mRecyclerViews);
        List<String> mLeftList = YuyueKeshiDataUtils.getYuyueLeftList();
        BaseRecyclerRefreshAdapter<String> mAdapter = new BaseRecyclerRefreshAdapter<String>(getActivity(), mLeftList, R.layout.xiaofei_item_view) {
            @Override
            public void convert(BaseRecyclerHolder holder, String item, int position, boolean isScrolling) throws IOException {

            }
        };
        mRecyclerViews.setAdapter(mAdapter);
        mAdapter.setOnItemClickListener(this);
    }

    @Override
    public void onItemClick(RecyclerView parent, View view, int position) {
        openActivityWitchAnimation(XiaofeiMingXiDetialsActivity.class);
    }
}